package vashion.azeroth.api.controller.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import vashion.azeroth.core.service.tran.PersonalSnapshotService;

@Controller
@RequestMapping("/task")
public class RebateController {
	
	private Boolean isOpen;
	
	@Autowired
	private PersonalSnapshotService snapshotService;

	@RequestMapping("/executeRebate")
	@ResponseBody
	public void rebate() {
//		if(isOpen) {
//			snapshotService.executeRebate();
//		}
		
		snapshotService.executeRebate();
			
		return;
	}

	public Boolean getIsOpen() {
		return isOpen;
	}

	public void setIsOpen(Boolean isOpen) {
		this.isOpen = isOpen;
	}

}
